package com.patents.service;

import com.patents.dao.PatentsMapper;
import com.patents.pojo.Patents;

import java.util.List;

public class PatentsServiceImpl implements PatentsService{
    private PatentsMapper patentsMapper;
    public void setPatentsMapper(PatentsMapper patentsMapper) {
        this.patentsMapper = patentsMapper;
    }

    @Override
    public int addPatents(Patents patents) {
        return patentsMapper.addPatents(patents);
    }

    @Override
    public int deletePatentsById(int id) {
        return patentsMapper.deletePatentsById(id);
    }

    @Override
    public int updatePatents(Patents patents) {
        return patentsMapper.updatePatents(patents);
    }

    @Override
    public Patents queryPatentsById(int id) {
        return patentsMapper.queryPatentsById(id);
    }

    @Override
    public Patents queryPatentsByPatenter(String patenter) {
        return patentsMapper.queryPatentsByPatenter(patenter);
    }

    @Override
    public List<Patents> queryAllPatents() {
        return patentsMapper.queryAllPatents();
    }
}
